<?php

class ResourceTable extends Doctrine_Table
{
  public function getResourcesNotWorkingInProject($projecId)
  {
    $resourcesNotWorkingInProject = Doctrine::getTable('Resource')
      ->createQuery('r')	  
	  ->where('r.resourceid not in (select resourceid from projectresource where projectid =?)', $projecId)
	  ->execute();

	return $resourcesNotWorkingInProject;
  }
}